package com.gistone.commis.mapper;

import com.gistone.commis.entity.AttendanceNotify;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AttendanceNotifyMapper  {
    int deleteByPrimaryKey(Integer anId);

    int insert(AttendanceNotify record);

    int insertSelective(AttendanceNotify record);

    AttendanceNotify selectByPrimaryKey(Integer anId);

    int updateByPrimaryKeySelective(AttendanceNotify record);

    int updateByPrimaryKey(AttendanceNotify record);

    @Select("SELECT * FROM tb_attendance_notify WHERE community_id=#{0} and year = #{1} and month = #{2}")
    List<AttendanceNotify> selectByCommunityAndYearAndMonth(int commmunityId, int nowYear, int nowMonth);


    @Select("SELECT * FROM tb_attendance_notify WHERE community_id=#{0} and year = #{1} and month = #{2} and flag = #{3}")
    List<AttendanceNotify> selectByCommunityAndYearAndMonthAndFlag(int commmunityId, int nowYear, int nowMonth,int flag);


}